<template>
	<view class="">
		<!-- banner -->
		<view class="allbanner" style="position: relative;">
			<view class="bannercenter flexcolumn">
				<view class="bannerimgtext">
					<image src="@/static/image/system/f7xn.png" mode="" class=""></image>
				</view>
				<view class="bannertext3 margin_top">诉讼评估</view>
			</view>
			<image :src="topimg" mode=""></image>
		</view>
		<!-- 内容 -->
		<view class="mainpadding">
			<view class="lansebox mainpadding radius">
				<view class="flexleft " :class="index==0?'':'margin_top4'" v-for="(item,index) in sm" :key="item.id">
					<view class="icon margin_right4">
						<image :src="item.image_text" mode=""></image>
					</view>
					<view class="">
						<view class="lansetext ">{{item.name}}</view>
						<view class="nostrongtext">{{item.des}}</view>
					</view>
				</view>
			</view>
			<!-- 选择理由 -->
			<view class="mainpadding ffffff margin_top radius">
				<view class="flexcenter">
					<view class="line margin_right2"></view>
					<view class="titletext margin_right2">选择理由</view>
					<view class="line"></view>
				</view>
				<view class="flextops flex_wrap">
					<view class="margin_top flexcenter ershiw" v-for="item in ly_list" :key="item.id" @click="yizygy(item)">
						<view class="">
							<view class="iconbox">
								<image class="lhtb" :src="item.image_text" mode=""></image>
							</view>
							<view class="nostrongtext textcenter margin_top1">{{item.name}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				topimg:"",
				ly_list: [],
				sm:[],
			}
		},
		onShow() {
			this.getly()
			this.getsm()
			this.getbanner()
		},
		methods: {
			getbanner() {
				httpRequest.request('/api/index/getAdvertiseList', 'POST', {
					advertise_position_id: 20,
					is_more: 2
				}, false, false, true).then(res => {
					this.topimg = res.data.image_text
				})
			},
			getly() { //诉讼理由
				httpRequest.request('/api/index/sspgTypeIndex', 'GET', {}).then(res => {
					this.ly_list = res.data
				})
			},
			getsm() { //诉讼说明
				httpRequest.request('/api/index/sspgTbIndex', 'GET', {}).then(res => {
					this.sm = res.data
				})
			},
			// 跳转诉讼请求
			yizygy(item) {
				uni.navigateTo({
					url: '/pages/index/susongqq?msg=' + encodeURIComponent(JSON.stringify(item))
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.ershiw {
		width: 25%;
	}
	.lhtb {
		width: 100rpx;
		height: 100rpx;
		border-radius: 50%;
		image {
			border-radius: 50%;
			width: 100%;
			height: 100%;
		}
	}

	// .iconbox {
	// 	background-color: #EDEDFF;
	// 	border-radius: 50%;
	// 	padding: 30rpx;
	// 	display: flex;
	// 	align-items: center;
	// 	justify-content: center;
	// }

	.line {
		width: 220rpx;
		height: 3rpx;
		background-color: #f5f5f5;
	}

	.icon2 {
		width: 72rpx;
		height: 86rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.icon1 {
		width: 72rpx;
		height: 72rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.icon {
		width: 72rpx;
		height: 52rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.lansetext {
		font-size: 30rpx;
		font-weight: bold;
		color: #0561D2;
	}

	.lansebox {
		background-color: #EAF5FC;
	}

	page {
		background-color: #f5f5f5;
	}

	.fudongdw {
		position: absolute;
		bottom: 68rpx;
		left: 36%;
	}
</style>